<div class="mws-panel grid_8">

   <div class="mws-panel-header">
     <span class="mws-i-24 i-table-1"><?php echo __('Students'); ?></span>
  </div>

<div class="mws-panel-body">
<div class="right_direction">	 
	<table cellpadding="0" cellspacing="0"  class="mws-table">
	<thead>
	<tr>
			<th><?php echo $this->Paginator->sort('id'); ?></th>
			<th><?php echo $this->Paginator->sort('serial'); ?></th>
			<th><?php echo $this->Paginator->sort('fullname'); ?></th>
			<th><?php echo $this->Paginator->sort('nation'); ?></th>
			<th><?php echo $this->Paginator->sort('gender'); ?></th>
			<th><?php echo $this->Paginator->sort('birth'); ?></th>
			<th><?php echo $this->Paginator->sort('birth_place'); ?></th>
			<th><?php echo $this->Paginator->sort('country'); ?></th>
			<th><?php echo $this->Paginator->sort('city'); ?></th>
			<th><?php echo $this->Paginator->sort('address'); ?></th>
			<th><?php echo $this->Paginator->sort('home_phone'); ?></th>
			<th><?php echo $this->Paginator->sort('phone_no'); ?></th>
			<th><?php echo $this->Paginator->sort('email'); ?></th>
			<th><?php echo $this->Paginator->sort('ssn'); ?></th>
			<th><?php echo $this->Paginator->sort('passport_no'); ?></th>
			<th><?php echo $this->Paginator->sort('marital'); ?></th>
			<th><?php echo $this->Paginator->sort('military_service'); ?></th>
			<th><?php echo $this->Paginator->sort('last_graduated'); ?></th>
			<th><?php echo $this->Paginator->sort('place_graduated'); ?></th>
			<th><?php echo $this->Paginator->sort('master_name'); ?></th>
			<th><?php echo $this->Paginator->sort('master_phone'); ?></th>
			<th><?php echo $this->Paginator->sort('master_address'); ?></th>
			<th><?php echo $this->Paginator->sort('branch_id'); ?></th>
			<th><?php echo $this->Paginator->sort('study_type'); ?></th>
			<th><?php echo $this->Paginator->sort('on_date'); ?></th>
			<th><?php echo $this->Paginator->sort('info'); ?></th>
			<th><?php echo $this->Paginator->sort('status'); ?></th>
			<th><?php echo $this->Paginator->sort('secret_no'); ?></th>
			<th><?php echo $this->Paginator->sort('user_id'); ?></th>
			<th><?php echo $this->Paginator->sort('created'); ?></th>
			<th><?php echo $this->Paginator->sort('modified'); ?></th>
			<th class="actions"><?php echo __('Actions'); ?></th>
	</tr>
	</thead>
	<tbody>
	<?php
	foreach ($students as $student): ?>
	<tr>
		<td><?php echo h($student['Student']['id']); ?>&nbsp;</td>
		<td><?php echo h($student['Student']['serial']); ?>&nbsp;</td>
		<td><?php echo h($student['Student']['fullname']); ?>&nbsp;</td>
		<td><?php echo h($student['Student']['nation']); ?>&nbsp;</td>
		<td><?php echo h($student['Student']['gender']); ?>&nbsp;</td>
		<td><?php echo h($student['Student']['birth']); ?>&nbsp;</td>
		<td><?php echo h($student['Student']['birth_place']); ?>&nbsp;</td>
		<td><?php echo h($student['Student']['country']); ?>&nbsp;</td>
		<td><?php echo h($student['Student']['city']); ?>&nbsp;</td>
		<td><?php echo h($student['Student']['address']); ?>&nbsp;</td>
		<td><?php echo h($student['Student']['home_phone']); ?>&nbsp;</td>
		<td><?php echo h($student['Student']['phone_no']); ?>&nbsp;</td>
		<td><?php echo h($student['Student']['email']); ?>&nbsp;</td>
		<td><?php echo h($student['Student']['ssn']); ?>&nbsp;</td>
		<td><?php echo h($student['Student']['passport_no']); ?>&nbsp;</td>
		<td><?php echo h($student['Student']['marital']); ?>&nbsp;</td>
		<td><?php echo h($student['Student']['military_service']); ?>&nbsp;</td>
		<td><?php echo h($student['Student']['last_graduated']); ?>&nbsp;</td>
		<td><?php echo h($student['Student']['place_graduated']); ?>&nbsp;</td>
		<td><?php echo h($student['Student']['master_name']); ?>&nbsp;</td>
		<td><?php echo h($student['Student']['master_phone']); ?>&nbsp;</td>
		<td><?php echo h($student['Student']['master_address']); ?>&nbsp;</td>
		<td>
			<?php echo $this->Html->link($student['Branch']['name'], array('controller' => 'branches', 'action' => 'view', $student['Branch']['id'])); ?>
		</td>
		<td><?php echo h($student['Student']['study_type']); ?>&nbsp;</td>
		<td><?php echo h($student['Student']['on_date']); ?>&nbsp;</td>
		<td><?php echo h($student['Student']['info']); ?>&nbsp;</td>
		<td><?php echo h($student['Student']['status']); ?>&nbsp;</td>
		<td><?php echo h($student['Student']['secret_no']); ?>&nbsp;</td>
		<td>
			<?php echo $this->Html->link($student['User']['id'], array('controller' => 'users', 'action' => 'view', $student['User']['id'])); ?>
		</td>
		<td><?php echo h($student['Student']['created']); ?>&nbsp;</td>
		<td><?php echo h($student['Student']['modified']); ?>&nbsp;</td>
		<td class="actions">
			<?php echo $this->Html->link(__('View'), array('action' => 'view', $student['Student']['id']),array("class"=>"mws-ic-16 ic-view")); ?>
			<?php echo $this->Html->link(__('Edit'), array('action' => 'edit', $student['Student']['id']),array("class"=>"mws-ic-16 ic-hammer-screwdriver")); ?>
			<?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $student['Student']['id']), array("class"=>"mws-ic-16 ic-cross"), __('Are you sure you want to delete # %s?', $student['Student']['id'])); ?>
		</td>
	</tr>
<?php endforeach; ?>
	</tbody>
	</table>
	</div> 
	<?php if($this->Paginator->hasPrev()||$this->Paginator->hasNext()){ ?>	<p>
	<div class="mws-pagination">
	<?php
		echo $this->Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled'));
		echo $this->Paginator->numbers(array('separator' => '',"tag"=>"li"));
		echo $this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled'));
	?>
	
	</div>
	</p>
	<?php } ?> </div>
</div>
<div class="actions">
	<h3><?php echo __('Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('New Student'), array('action' => 'add')); ?></li>
		<li><?php echo $this->Html->link(__('List Branches'), array('controller' => 'branches', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Branch'), array('controller' => 'branches', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Users'), array('controller' => 'users', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New User'), array('controller' => 'users', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Resultexams'), array('controller' => 'resultexams', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Resultexam'), array('controller' => 'resultexams', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Studentbranches'), array('controller' => 'studentbranches', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Studentbranch'), array('controller' => 'studentbranches', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Studentsubjects'), array('controller' => 'studentsubjects', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Studentsubject'), array('controller' => 'studentsubjects', 'action' => 'add')); ?> </li>
	</ul>
</div>
